Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve ASSERT_IS_VALID_CHUNK macro #5135

Merged
merged 1 commit into from Jan 2, 2023

Conversation

svenklemm
Copy link
Member

Currently when ASSERT_IS_VALID_CHUNK fails it is impossible to tell which of the conditions fails without opening the coredump in debugger as all the conditions are ANDed in a single Assert. This patch splits the conditions into individual Asserts so you can immediately see from stacktrace which condition failed.

@svenklemm svenklemm force-pushed the valid_chunk_macro branch 2 times, most recently from 1a9feae to bd34d43 Compare January 2, 2023 20:33
@codecov
Copy link

codecov bot commented Jan 2, 2023

Codecov Report

Merging #5135 (5b73dfd) into main (93667df) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5135      +/-   ##
==========================================
- Coverage   89.47%   89.44%   -0.03%     
==========================================
  Files         227      227              
  Lines       51615    51614       -1     
==========================================
- Hits        46181    46165      -16     
- Misses       5434     5449      +15     
Impacted Files Coverage Δ
src/chunk.h 100.00% <ø> (ø)
tsl/src/nodes/decompress_chunk/decompress_chunk.c 95.08% <100.00%> (ø)
src/loader/bgw_launcher.c 89.51% <0.00%> (-2.55%) ⬇️
src/bgw/scheduler.c 83.88% <0.00%> (-1.54%) ⬇️
tsl/src/reorder.c 85.87% <0.00%> (-0.23%) ⬇️
tsl/src/bgw_policy/job.c 87.28% <0.00%> (-0.05%) ⬇️
src/loader/bgw_message_queue.c 89.20% <0.00%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3a8d294...5b73dfd. Read the comment docs.

Currently when ASSERT_IS_VALID_CHUNK fails it is impossible to tell
which of the conditions fails without opening the coredump in debugger
as all the conditions are ANDed in a single Assert. This patch splits
the conditions into individual Asserts so you can immediately see
from stacktrace which condition failed.
@svenklemm svenklemm enabled auto-merge (rebase) January 2, 2023 21:58
@svenklemm svenklemm merged commit 64e8e31 into timescale:main Jan 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants